package com.learn.springlearn.controller;

import com.learn.springlearn.config.RepeatBeanConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@Component
@Controller
public class B {

    @Autowired
    private RepeatBeanConfig.F master;

    @Autowired
    C c;


    public String  sayHello(){
        return "hello world";
    }


    @GetMapping("login")
    public String login(){
        System.out.println(master.getName());
        return "login";
    }

    @GetMapping("req")
    public void req(HttpServletResponse response) throws IOException {
        response.getWriter().write("hhhhh");
    }



}
